home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / alib / csup / commodities_support / hotkey.c < prev    next >
C/C++ Source or Header  |  1994-02-15  |  555b  |  31 lines

  1.  
  2.  
  3. #include <exec/types.h>
  4. #include <exec/libraries.h>
  5. #include <libraries/commodities.h>
  6. #include <clib/commodities_protos.h>
  7. #include <pragmas/commodities_pragmas.h>
  8.  
  9.  
  10. extern struct Library   * __far CxBase;
  11.  
  12.  
  13. CxObj *HotKey(STRPTR descr, struct MsgPort *port, LONG ID)
  14. {
  15. CxObj *filter;
  16.  
  17.    if (filter = CxFilter(descr))
  18.    {
  19.        AttachCxObj(filter,CxSender(port,ID));
  20.        AttachCxObj(filter,CxTranslate(NULL));
  21.  
  22.        if (CxObjError(filter))
  23.        {
  24.           DeleteCxObjAll(filter);
  25.           filter = NULL;
  26.        }
  27.    }
  28.  
  29.    return (filter);
  30. }
  31.